Skip to content

Video slice changes - #979

Open
sachinku173 wants to merge 3 commits into
qualcomm-linux:qcom-6.18.yfrom
sachinku173:video_slice_changes
Open

Video slice changes#979
sachinku173 wants to merge 3 commits into
qualcomm-linux:qcom-6.18.yfrom
sachinku173:video_slice_changes

Conversation

@sachinku173

@sachinku173 sachinku173 commented Aug 19, 2026

Copy link
Copy Markdown

Hi All,

Above series adds support for multi-slice encoding in the Qualcomm Iris
driver.

Patch 1 is a prerequisite fix: iris_set_stage() computes a work_mode
but never caches it back into inst->fw_caps[STAGE].value, leaving
buffer-size and clock-frequency calculations based on a stale value.

Patch 2 is another prerequisite fix: iris_set_stage() currently always
selects STAGE_2 work mode for encoder sessions, but CBR rate control
requires STAGE_1. This is fixed by forcing STAGE_1 when BITRATE_MODE is
set to CBR.

Patch 3 adds the multi-slice support itself for Iris HFI Gen2 based
targets.

CRs-fixed: 4650099

Sachin Kumar Garg added 3 commits August 19, 2026 14:37
…_stage

iris_set_stage() computes work_mode and sends it to firmware but
never updates inst->fw_caps[STAGE].value, leaving the cached STAGE
value stale. iris_vpu_enc_bin_size() and
iris_vpu3x_vpu4x_calculate_frequency() read this cached value, so a
stale default causes them to miscalculate buffer size and clock
frequency for sessions actually running in a different stage than
the cached one.

Update inst->fw_caps[cap_id].value with the computed work_mode
before sending it to firmware, keeping the cache consistent with
what is actually configured.

Link: https://lore.kernel.org/all/20260728-iris_multi_slice-v8-1-eb18f96f0ed8@oss.qualcomm.com/
Fixes: 3a19d7b ("media: iris: implement set properties to firmware during streamon")
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
iris_set_stage() currently always picks STAGE_2 for encoder sessions.
CBR rate control requires stage 1 operation, so force STAGE_1 when
BITRATE_MODE is set to CBR.

The BITRATE_MODE fw_cap value is used instead of inst->hfi_rc_type
since STAGE precedes BITRATE_MODE in enum platform_inst_fw_cap_type,
so iris_set_properties() would still see the previous hfi_rc_type
when iris_set_stage() runs during initial config

Link: https://lore.kernel.org/all/20260728-iris_multi_slice-v8-2-eb18f96f0ed8@oss.qualcomm.com/
Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
Add multi-slice encoding support with MAX_MB and MAX_BYTES modes.

Clients can enable slice mode using V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE
control and configure slice size via V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB
or V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES controls.

Link: https://lore.kernel.org/all/20260728-iris_multi_slice-v8-3-eb18f96f0ed8@oss.qualcomm.com/
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

3 similar comments
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4650099 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4650099
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qlijarvis

Copy link
Copy Markdown

PR #979 — validate-patch

PR: #979

Verdict Issues Detailed Report
⚠️ 1 Full report

Final Summary

  1. Lore link present: Yes - all three commits have correct Link: tags pointing to v8 series on lore.kernel.org
  2. Lore link matches PR commits: Yes - diff content is identical to lore v8 patches; commit messages faithfully preserve upstream rationale, Fixes tags, and review tags
  3. Upstream patch status: ⏳ Decision Pending (superseded by v9) - v8 received Reviewed-by: tags from Vikash Garodia and Vishnu Reddy, but was superseded by v9 on August 1, 2026; no maintainer merge decision yet
  4. PR present in qcom-next/topics: Yes - all 3 commit(s) are present in qcom-next or topics
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #979 - media: qcom: iris: add multi slice support (3 commits)
Upstream commits: v8 series on lore.kernel.org
Verdict: ⚠️ PARTIAL

Commit Message

Check Status Note
Subject matches upstream All three subjects match lore v8 (with FROMLIST: prefix added)
Body preserves rationale All commit bodies faithfully preserve upstream rationale
Fixes tag present/correct Commit 1/3 has correct Fixes tag matching upstream
Authorship preserved All commits preserve original author (Sachin Kumar Garg) - FROMLIST: allows submitter in From: field
Backport note (if applicable) N/A Not a backport - FROMLIST: prefix indicates pending upstream patch

Diff

File Status Notes
drivers/media/platform/qcom/iris/iris_ctrls.c (1/3) Identical to lore v8 patch 1 - adds cache update for work_mode
drivers/media/platform/qcom/iris/iris_ctrls.c (2/3) Identical to lore v8 patch 2 - forces STAGE_1 for CBR RC
drivers/media/platform/qcom/iris/iris_ctrls.c (3/3) Identical to lore v8 patch 3 - adds multi-slice support
drivers/media/platform/qcom/iris/iris_ctrls.h (3/3) Matches upstream
drivers/media/platform/qcom/iris/iris_hfi_gen2.c (3/3) Matches upstream
drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h (3/3) Matches upstream
drivers/media/platform/qcom/iris/iris_platform_common.h (3/3) Matches upstream
drivers/media/platform/qcom/iris/iris_platform_vpu2.c (3/3) Matches upstream

Issues

  • Superseded revision: The PR links to v8 of the patch series (posted July 28, 2026), but a v9 revision was posted on August 1, 2026. The lore thread shows the series progressed from v7 → v8 → v9. While the v8 patches are technically correct, using a superseded revision may mean missing improvements or fixes from v9.

Verdict

The PR patches are faithful representations of the lore v8 series. All three commits match their upstream counterparts exactly in both commit message content and diff hunks. The FROMLIST: prefix is correctly applied, authorship is preserved, and the Link: tags point to the correct lore message-IDs.

However, the series was superseded by v9 three days after v8 was posted. Recommendation: Verify whether v9 contains material changes; if so, update the PR to track v9 instead of v8.

Final Summary

  1. Lore link present: Yes - all three commits have correct Link: tags pointing to v8 series on lore.kernel.org
  2. Lore link matches PR commits: Yes - diff content is identical to lore v8 patches; commit messages faithfully preserve upstream rationale, Fixes tags, and review tags
  3. Upstream patch status: ⏳ Decision Pending (superseded by v9) - v8 received Reviewed-by: tags from Vikash Garodia and Vishnu Reddy, but was superseded by v9 on August 1, 2026; no maintainer merge decision yet
  4. PR present in qcom-next/topics: Yes - all 3 commits are present in qcom-next (exact patch-id match for 1/3 and 2/3; content match for 3/3)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 3c1e80ceb9fb6978aa94bc0624e7c0003f3b4f6e
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/3 [PATCH 1/3] FROMLIST: media: iris: cache work mode after computing it present - exact patch-id match at 3cf5e0e skipped - not checked because qcom-next already contains the change present
2/3 [PATCH 2/3] FROMLIST: media: iris: force stage 1 work mode for CBR RC present - exact patch-id match at 5b81ed0 skipped - not checked because qcom-next already contains the change present
3/3 [PATCH 3/3] FROMLIST: media: iris: add support for multi_slice in present - all checked added lines are present skipped - not checked because qcom-next already contains the change present

Final Status

overall_status: PASS
present_commits: 3/3
partial_commits: 0/3
missing_commits: 0/3
topics_checked_for_commits: 0/3
final_summary: PR present in qcom-next/topics: Yes - all 3 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #979 — checker-log-analyzer

PR: #979
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/32238844253

Checker Result Summary
Checker Result Summary
checkpatch All commits passed
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed (pre-existing imagination driver errors unrelated to PR)
check-uapi-headers Passed
check-patch-compliance Content mismatch on commit 3/3
tag-check All commits have valid FROMLIST: prefix
qcom-next-check ⚠️ All commits are FROMLIST: — verify they exist in qcom-next

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #979 - media: iris: add support for multi_slice in iris encoder
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/32238844253
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch All commits passed
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed (pre-existing imagination driver errors unrelated to PR)
check-uapi-headers Passed
check-patch-compliance Content mismatch on commit 3/3
tag-check All commits have valid FROMLIST: prefix
qcom-next-check ⚠️ All commits are FROMLIST: — verify they exist in qcom-next

❌ check-patch-compliance

Root cause: The third commit's patch content differs from the upstream lore.kernel.org version.

Failure details:

Checking commit: FROMLIST: media: iris: add support for multi_slice in iris encoder
Change is different from the one mentioned in Link

Commit: 08d2f0885cc8a6e010129bec2022e5d15d42ac2f
Link: https://lore.kernel.org/all/20260728-iris_multi_slice-v8-3-eb18f96f0ed8@oss.qualcomm.com/

Analysis:

The checker detected that the patch content in the PR does not match the upstream patch at the provided lore link. This can happen for several reasons:

  1. Context-only differences — line numbers shifted but actual changes are identical (false positive)
  2. Legitimate adaptation — backport required modifications for the target kernel version
  3. Missing hunks — some changes from upstream were omitted
  4. Extra hunks — additional changes not present upstream

Fix:

  1. Fetch the upstream patch and compare:

    b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260728-iris_multi_slice-v8-3-eb18f96f0ed8@oss.qualcomm.com/ -o /tmp/upstream
    git format-patch -1 08d2f0885cc8a6e010129bec2022e5d15d42ac2f --stdout > /tmp/pr-patch.patch
    
    # Compare the actual code changes (ignoring context line numbers)
    diff <(awk '/^diff/,/^--$/' /tmp/pr-patch.patch | grep -E '^[+-][^+-]') \
         <(awk '/^diff/,/^--$/' /tmp/upstream/*.mbx | grep -E '^[+-][^+-]')
  2. If differences are real:

    • Context-only shift: No action needed — this is a checker limitation
    • Legitimate backport adaptation: Document the changes in the commit message with a note like:
      [ qcom-6.18.y: adapted for <reason>, changed <what> ]
      
    • Missing hunks: Cherry-pick the missing changes from upstream
    • Extra hunks: Remove them or attribute them to a separate commit
  3. If the patch is identical: This may be a transient b4 fetch issue. Re-trigger CI.

Reproduce locally:

cd kernel
git checkout qcom-6.18.y
git fetch origin pull/979/head:pr-979
git checkout pr-979
../kernel-checkers/check-patch-compliance.sh qcom-6.18.y HEAD~2..HEAD

⚠️ qcom-next-check

Note: All three commits use the FROMLIST: prefix, indicating they are posted upstream but not yet merged into mainline.

Recommendation: Verify that these commits are already present in qcom-next before merging to qcom-6.18.y. The typical workflow is:

  1. Patches land in qcom-next first
  2. After validation, they are backported to stable branches like qcom-6.18.y

If these commits are not yet in qcom-next, consider:

  • Merging them to qcom-next first, or
  • Changing the prefix to BACKPORT: if they required modifications for qcom-6.18.y

Verdict

1 blocker to fix before merge:

The check-patch-compliance content mismatch on commit 3/3 must be investigated and resolved. The patch either needs to match the upstream version exactly, or the differences must be documented in the commit message if they are legitimate backport adaptations.

All other checkers passed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants